package com.yonyou.ucf.mdf.app.isvdxq.other.model;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.yonyou.ucf.mdf.app.isvdxq.other.entity.ProductEntity;

import java.util.List;

@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class ProductBeanTempSKU extends ProductEntity {
    private Object name;

    public String getName() {
        if(name == null) return null;
        if(name instanceof String) return name.toString();
        else{
            NameBean obj = JSONObject.parseObject( JSONObject.toJSONString(name), NameBean.class );
            return obj.getZh_CN();
        }
    }

    public void setName(Object name) {
        this.name = name;
    }

    private String productTemplate;
    private List<ProductTempSKUBean> productskus;

    public String getProductTemplate() {
        return productTemplate;
    }

    public void setProductTemplate(String productTemplate) {
        this.productTemplate = productTemplate;
    }

    public List<ProductTempSKUBean> getProductskus() {
        return productskus;
    }

    public void setProductskus(List<ProductTempSKUBean> productskus) {
        this.productskus = productskus;
    }
}
